
from redis import StrictRedis
import logging

class Config:
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/test0603'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    SECRET_KEY = 'S+VW6sipqA7aZCW6zPHP26FZaIGjBPTbgix6jAX/OOA='
    SESSION_TYPE = 'redis'
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400
    REDES_HOST = '127.0.0.1'
    REDIS_PORT = 6379
    SESSION_REDIS = StrictRedis(host=REDES_HOST, port=REDIS_PORT)

class developmentConfig(Config):
    DEBUG = True
    LOG_LEVEL = logging.DEBUG

class productionConfig(Config):
    DEBUG = False
    LOG_LEVEL = logging.ERROR
config = {
    'develop': developmentConfig,
    'product': productionConfig
}